/*
 * RouteLink.java
 *
 * Created on March 5, 2007, 3:59 PM
 *
 * Copyright 2008 David D. Emory
 * 
 * This file is part of Five Points. See <http://www.fpdev.org> for
 * additional information regarding the project.
 * 
 * Five Points is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Five Points is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Five Points.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.fpdev.core.routenet;

import org.fpdev.core.transit.SubRoute;
import org.fpdev.core.transit.Timetable;
import org.fpdev.core.transit.*;
import org.fpdev.apps.rtemaster.gui.map.MapCanvas;

/**
 *
 * @author demory
 */
public abstract class RLink {

  protected int lastRun_;
  public static final int RLINK_SUBROUTE = 1;
  public static final int RLINK_BOARD = 2;
  public static final int RLINK_ALIGHT = 3;

  /** Creates a new instance of CRouteLink */
  public RLink() {
    lastRun_ = -1;
  }

  public int getLastRun() {
    return lastRun_;
  }

  public void setLastRun(int lastRun) {
    lastRun_ = lastRun;
  }

  public abstract int getType();

  public abstract String getID();

  public abstract SubRoute getSubRoute();

  public abstract int getStartDLI();

  public abstract int getEndDLI();

  public abstract int timeCostFW(int inTime, CalendarService service, double walkSpeedFPS, int transferTime);

  public abstract int timeCostBW(int outTime, CalendarService service, double walkSpeedFPS, int transferTime);

  public abstract void draw(MapCanvas canvas);
}
